/* system */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>

/* OpenCV */
#include <opencv2/opencv.hpp>

#include "epipolar.h"

const int POINT_COUNT = 1200;
const double EPS = 1e-6;


int main(int argc, char **argv)
{
	const char* inputfile = "D:\\movies\\optical_flow_input.avi";
	const char* outputfile = "D:\\movies\\optical_flow_output_my.avi";
    int feature_num = POINT_COUNT;

	CvCapture *video = NULL;
	EpipolarData epipolar;

	if (argc == 1)
            video = cvCreateFileCapture(inputfile);
	else if (argc == 2)
        {
            video = cvCreateFileCapture(argv[1]);
        }
        else if (argc == 3)
        {
            if (strcmp(argv[1], "-c") == 0)		// capture video
            {
                return 0;
            }
        }else if (argc == 4)
	{
			if (strcmp(argv[1], "-n") == 0)		// feature number
			{
				feature_num = atoi(argv[2]);
				video = cvCreateFileCapture(argv[3]);
			}
		}

            cvReleaseCapture(&video);

 	return 0;
}